// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   JobtypeBO_Client.java

package nc.ui.bd.b36;

import nc.bs.framework.common.NCLocator;
import nc.itf.uap.bd.job.IJobtypePrivate;
import nc.itf.uap.bd.job.IJobtypeQuery;
import nc.vo.bd.b36.JobtypeVO;
import nc.vo.pub.BusinessException;

public class JobtypeBO_Client
{

	private static IJobtypePrivate privateInterface = null;
	private static IJobtypeQuery publicInterface = null;

	public JobtypeBO_Client()
	{
	}

	private static IJobtypePrivate getPrivateInterface()
		throws BusinessException
	{
		if (privateInterface == null)
			privateInterface = (IJobtypePrivate)NCLocator.getInstance().lookup(nc.itf.uap.bd.job.IJobtypePrivate.class);
		return privateInterface;
	}

	private static IJobtypeQuery getPublicInterface()
		throws BusinessException
	{
		if (publicInterface == null)
			publicInterface = (IJobtypeQuery)NCLocator.getInstance().lookup(nc.itf.uap.bd.job.IJobtypeQuery.class);
		return publicInterface;
	}

	public static String delete(String key, String pkcorp)
		throws BusinessException
	{
		getPrivateInterface().deleteJobtypeVO(key, pkcorp);
		return "";
	}

	public static String insert(JobtypeVO jobtype, String pkcorp)
		throws BusinessException
	{
		return getPrivateInterface().insertJobtypeVO(jobtype, pkcorp);
	}

	public static String update(JobtypeVO jobtype, String pkcorp)
		throws BusinessException
	{
		getPrivateInterface().updateJobtypeVO(jobtype, pkcorp);
		return "";
	}

	public static JobtypeVO findByPrimaryKey(String key)
		throws BusinessException
	{
		return getPublicInterface().findJobtypeVOByPk(key);
	}

	public static JobtypeVO[] queryAll(String unitCode)
		throws BusinessException
	{
		return getPrivateInterface().queryAllJobtypeVOs(unitCode, null);
	}

	public static boolean isPhased(String pk_jobtype)
		throws Exception
	{
		return getPrivateInterface().isPhased(pk_jobtype);
	}

	public static JobtypeVO[] queryAllWithPhase(String unitCode)
		throws BusinessException
	{
		return getPrivateInterface().queryAllJobtypeVOs(unitCode, new Boolean(true));
	}

}
